]> dgit.raspbian.org Git - gnome-shell.git/commit
signalTracker: Avoid doing two maps lookups once they're initialized
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Wed, 6 Jul 2022 15:44:48 +0000 (17:44 +0200)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Wed, 6 Jul 2022 16:24:04 +0000 (18:24 +0200)
commit68ceed5c281a8931a1c45f170361a471312d0666
treeb9c17abdbe69c963f6c588ad3a583b470ed1c55f
parentbb115f11c50b5eec43477f8d7cdf82fe027ae0f6
signalTracker: Avoid doing two maps lookups once they're initialized

Avoid checking if a map contains a value, given that in the case it's
not there, get() will just return an undefined value. And only in such
case we need to set the value.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2366>
js/misc/signalTracker.js